Image information encoding and decoding method

ABSTRACT

The present invention relates to an image information encoding and decoding method and a device for same. One embodiment of an image information encoding method according to the present invention, as an image information encoding method according to another embodiment of the present invention, includes the steps of: generating a restore block; applying a deblocking filter on the restore block; applying a Sample Adaptive Offset (SAO) on the restore block having the deblocking filter applied thereon; and transmitting information on the SAO application. During the applying of the SAO, the SAO is applied to chroma pixels, and during the transmitting of the information, in addition to information on whether the SAO is applied on the chroma pixels, at least one of area information, division information on the SAO coverage area, SAO type information, and SAO offset information is transmitted.

TECHNICAL FIELD

The present invention relates to an image compression technique, andmore particularly, to a method of applying a sample adaptive offset(SAO) as an in-loop filter.

BACKGROUND ART

In recent years, demands for a high-resolution and high-quality videohave increased in various fields of applications. As a video has ahigher resolution and higher quality, an amount of data on the videoincreases more and more. Accordingly, when video data is transferredusing media such as existing wired or wireless broadband lines or videodata is stored in existing storage media, the transfer cost and thestorage cost of data increase.

In order to effectively transfer, store, and reproduce information onhigh-resolution and high-quality video, high-efficiency videocompression techniques can be utilized.

In order to enhance video compression efficiency, inter prediction andintra prediction can be utilized. In the inter prediction method, pixelvalues of a current picture are predicted with reference to informationof another picture. In the intra prediction method, pixel values of acurrent picture are predicted using inter-pixel relationships in thesame picture.

SUMMARY OF THE INVENTION Technical Problem

An object of the invention is to provide a method of adaptively applyingan SAO to improve an picture reconstruction effect.

Another object of the invention is to provide a method of applying anSAO in consideration of an occurrence frequency of a pixel by intensity.

Still another object of the invention is to provide a method oftransmitting information for applying an SAO to only an effective bandfrom an encoder to a decoder.

Still another object of the invention is to provide a method of applyingplural SAOs depending on an SAO application unit.

Still another object of the invention is to provide a method and adevice for applying an SAO on chroma pixels so as to enhance a shapereconstruction effect.

Still another object of the invention is to provide a method of applyingan SAO in consideration of characteristics of chroma pixels.

Solution to Problem

(1) According to an aspect of the invention, there is provided a videoinformation encoding method including the steps of: generating areconstructed block; applying a deblocking filter to the reconstructedblock; applying a sample adaptive offset (SAO) to the reconstructedblock to which the deblocking filter has been applied; and transmittinginformation on the application of the SAO, wherein the step of applyingthe SAO includes adaptively applying the SAO depending on an SAOapplication region to which the SAO will be applied.

(2) In the video information encoding method according to (1), the stepof applying the SAO may include dividing an intensity section having ahigh occurrence frequency into bands of a finer intensity unit andapplying a band offset.

(3) In the video information encoding method according to (1), the stepof applying the SAO may include applying a band offset to an intensitysection having a high occurrence frequency, and the step of transmittinginformation may include transmitting information on a section to whichthe band offset is applied.

(4) In the video information encoding method according to (1), the stepof applying the SAO may include applying an offset to only a band havinga high occurrence frequency, and the step of transmitting informationmay include transmitting information on the applied offset.

(5) In the video information encoding method according to (1), the stepof applying the SAO may include selectively applying a plurality ofdifferent edge offsets to pixels of one SAO application region.

(6) According to another aspect of the invention, there is provided avideo information encoding method including the steps of: generating areconstructed block; applying a deblocking filter to the reconstructedblock; applying a sample adaptive offset (SAO) to the reconstructedblock to which the deblocking filter has been applied; and transmittinginformation on the application of the SAO, wherein the step of applyingthe SAO includes applying the SAO to chroma pixels, and wherein the stepof transmitting information includes transmitting at least one of regioninformation, division information of an SAO application region, SAO typeinformation, and SAO offset information along with information onwhether to apply the SAO to the chroma pixels.

(7) In the video information encoding method according to (6), the stepof applying the SAO may include setting an SAO application region forchroma independently of an SAO application region for luma.

(8) In the video information encoding method according to (6), the stepof applying the SAO may include classifying intensities of chroma pixelsand applying a band offset to a band located in a section of a highoccurrence frequency in the entire intensity range.

(9) In the video information encoding method according to (6), the stepof applying the SAO may include determining to which of a case where theintensity of at least one of neighboring chroma pixels is greater thanthe intensity of a current pixel and a case where the intensity of atleast one of neighboring chroma pixels is less than the intensity of thecurrent chroma pixel a relationship between the current chroma pixel andthe neighboring chroma pixels belongs and applying an edge offset to thecurrent chroma pixel depending on the determination result.

(10) In the video information encoding method according to (6), the stepof transmitting information may include separately transmitting the SAOinformation for luma and chroma.

(11) According to still another aspect of the invention, there isprovided a video information decoding method including the steps of:receiving information; generating a reconstructed block on the basis ofthe received information; applying a deblocking filter to thereconstructed block; and applying a sample adaptive offset (SAO) to thereconstructed block to which the deblocking filter has been applied,wherein the step of applying the SAO includes adaptively applying theSAO depending on an SAO application region to which the SAO will beapplied.

(12) In the video information decoding method according to (11), thestep of applying the SAO may include dividing an intensity sectionhaving a high occurrence frequency into bands of a finer intensity unitand applying a band offset.

(13) In the video information decoding method according to (11), thestep of applying the SAO may include applying a band offset to anintensity section having a high occurrence frequency, and the intensitysection having a high occurrence frequency may be determined on thebasis of the received information.

(14) In the video information decoding method according to (11), thestep of applying the SAO may include applying an offset to only a bandcorresponding to the offset included in the received information out ofthe total bands.

(15) In the video information decoding method according to (11), thestep of applying the SAO may include selectively applying a plurality ofdifferent edge offsets to pixels of one SAO application region, and theselectively-applied edge offsets may be determined on the basis of thereceived information.

(16) According to still another aspect of the invention, there isprovided a video information decoding method including the steps of:receiving information; generating a reconstructed block; applying adeblocking filter to the reconstructed block; and applying a sampleadaptive offset (SAO) to the reconstructed block to which the deblockingfilter has been applied, wherein the step of applying the SAO includesapplying the SAO to chroma pixels, and wherein the information receivedin the step of receiving information includes at least one of regioninformation, division information of an SAO application region, SAO typeinformation, and SAO offset information along with information onwhether to apply the SAO to the chroma pixels.

(17) In the video information decoding method according to (16), an SAOapplication region for chroma in the step of applying the SAO may be setindependently of an SAO application region for luma.

(18) In the video information decoding method according to (16), thestep of applying the SAO may include classifying intensities of chromapixels and applying a band offset to a band located in a section of ahigh occurrence frequency in the entire intensity range.

(19) In the video information decoding method according to (16), thestep of applying the SAO may include determining to which of a casewhere the intensity of at least one of neighboring chroma pixels isgreater than the intensity of a current pixel and a case where theintensity of at least one of neighboring chroma pixels is less than theintensity of the current chroma pixel a relationship between the currentchroma pixel and the neighboring chroma pixels belongs and applying anedge offset to the current chroma pixel depending on the determinationresult, and the value of the edge offset may be determined on the basisof the information received in the step of receiving information.

(20) In the video information decoding method according to (16), theinformation received in the step of receiving information may indicatewhich of information on luma, information on chroma, and information onboth luma and chroma the information is.

Advantageous Effects

According to the invention, it is possible to enhance a videoreconstruction effect by adaptively applying an SAO.

According to the invention, it is possible to enhance a videoreconstruction effect by applying an SAO in consideration of anoccurrence frequency of a pixel by intensity.

According to the invention, it is possible to reduce an amount ofinformation to be transmitted by applying an SAO to only an effectiveband and transmitting relevant information from an encoder to a decoder.

According to the invention, it is possible to enhance a picturereconstruction effect by applying plural SAOs depending on an SAOapplication unit.

According to the invention, it is possible to enhance a picturereconstruction effect by applying an SAO on chroma pixels.

According to the invention, it is possible to enhance a picturereconstruction effect by applying an SAO to chroma pixels inconsideration of characteristics of the chroma pixels.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram schematically illustrating a video encodingapparatus (encoder) according to an embodiment of the invention.

FIG. 2 is a block diagram schematically illustrating a video decoderaccording to an embodiment of the invention.

FIG. 3 is a diagram schematically illustrating a band offset.

FIG. 4 is a diagram illustrating an example of histograms based oncharacteristics of a predetermined picture.

FIG. 5 is a diagram schematically illustrating an example of a method ofadaptively dividing intensities of all pixels and applying a band offsetthereto.

FIG. 6 is a diagram schematically illustrating another example of themethod of adaptively dividing intensities of all pixels and applying aband offset thereto.

FIG. 7 is a diagram illustrating examples of representative forms ofedges which can occur in a block by directions.

FIG. 8 is a diagram illustrating four representative edge types of anedge offset with respect to a current pixel (C).

FIG. 9 is a diagram schematically illustrating an example where acurrent pixel is compared in intensity with neighboring pixels and theintensities are grouped into four categories.

FIG. 10 is a diagram schematically illustrating an SAO application unitas a region to which an SAO is applied.

FIG. 11 is a diagram illustrating local distributions of a histogram ofthe same picture.

FIG. 12 is a diagram schematically illustrating an example where a bandoffset is applied to only some bands of the total bands for chromapixels.

FIG. 13 is a diagram schematically illustrating another example wherethe band offset is applied to only some bands of the total bands forchroma pixels.

FIG. 14 is a flowchart schematically illustrating an operation of anencoder in a system according to the invention.

FIG. 15 is a flowchart schematically illustrating an operation of adecoder in a system according to the invention.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The invention may be variously modified in various forms and may havevarious embodiments, and specific embodiments thereof will beillustrated in the drawings and described in detail. However, theseembodiments are not intended for limiting the invention. Terms used inthe below description are used to merely describe specific embodiments,but are not intended for limiting the technical spirit of the invention.An expression of a singular number includes an expression of a pluralnumber, so long as it is clearly read differently. Terms such as“include” and “have” in this description are intended for indicatingthat features, numbers, steps, operations, elements, components, orcombinations thereof used in the below description exist, and it shouldbe thus understood that the possibility of existence or addition of oneor more different features, numbers, steps, operations, elements,components, or combinations thereof is not excluded.

On the other hand, elements of the drawings described in the inventionare independently drawn for the purpose of convenience of explanation ondifferent specific functions in a video encoder and a video decoder, anddo not mean that the elements are embodied by independent hardware orindependent software. For example, two or more elements out of theelements may be combined to form a single element, or one element may bedivided into plural elements. Embodiments in which the elements arecombined and/or divided belong to the scope of the invention withoutdeparting from the concept of the invention.

Hereinafter, exemplary embodiments of the invention will be described indetail with reference to the accompanying drawings. The same elements inthe drawings will be referenced by the same reference signs and thedescription of the same elements will not be repeated.

FIG. 1 is a block diagram schematically illustrating a video encodingapparatus (encoder) according to an embodiment of the invention.Referring to FIG. 1, a video encoder 100 includes a picture dividingmodule 105, a prediction module 110, a transform module 115, aquantization module 120, a rearrangement module 125, an entropy encodingmodule 130, a dequantization module 135, an inverse transform module140, a filter module 145, and a memory 150.

The picture dividing module 105 can divide an input picture into atleast one process unit. Here, the process unit may be a prediction unit(hereinafter, referred to as a “PU”), a transform unit (hereinafter,referred to as a “TU”), or a coding unit (hereinafter, referred to as a“CU”).

The prediction module 110 includes an inter prediction module thatperforms an inter prediction process and an intra prediction module thatperforms an intra prediction process, as will be described later. Theprediction module 110 predicts the process unit of the picture dividedby the picture dividing module 105 to generate a prediction block. Theprocess unit of a picture in the prediction module 110 may be a CU, aTU, or a PU. It may be determined whether the prediction performed onthe corresponding process unit is inter prediction or intra prediction,and specific details (for example, a prediction mode) of the predictionmethods may be determined. The process unit subjected to the predictionprocess may be different from the process unit of which the predictionmethod and the specific details are determined. For example, theprediction method and the prediction mode may be determined by the PUunits and the prediction process may be performed by the TU units.

In the inter prediction, a prediction process is performed on the basisof information on at least one of a previous picture and/or a subsequentpicture of a current picture to generate a prediction block. In theintra prediction, a prediction process is performed on the basis ofpixel information of a current picture to generate a prediction block.

In the inter prediction, a reference picture is selected for a PU, and areference block having the same size as the PU is selected. Then, aprediction block is generated so that a residual signal from the currentPU is minimized and the magnitude of a motion vector is minimized. Onthe other hand, a skip mode, a merge mode, an MVP (Motion VectorPrediction), or the like can be used as the intra prediction method. Theprediction block may be generated in the unit of pixel samples less thanan integer pixel, such as ½ pixel samples and ¼ pixel samples. Here, amotion vector can also be expressed in the unit of pixel samples lessthan an integer pixel. For example, luma pixels can be expressed in theunit of ¼ pixels and chroma pixels can be expressed in the unit of ⅛pixels.

Information such as an index of a reference picture selected through theinter prediction, a motion vector (for example, a motion vectorpredictor), and a residual signal is entropy-encoded and is transmittedto a decoder.

When the intra prediction is performed, a prediction mode may bedetermined in the unit of PUs and the prediction process may beperformed in the unit of PUs. Alternatively, a prediction mode may bedetermined in the unit of PUs and the inter prediction may be performedin the unit of TUs.

The prediction modes in the intra prediction include 33 directionalprediction modes and at least two non-directional modes. Thenon-directional modes include a DC prediction mode and a planar mode.

In the intra prediction, a prediction block may be generated after afilter is applied to reference samples. At this time, it may bedetermined whether a filter should be applied to reference samples,depending on the intra prediction mode and/or the size of a currentblock.

A PU may have various sizes/shapes. For example, in case of the interprediction, a PU may have sizes such as 2N×2N, 2N×N, N×2N, and N×N. Incase of the intra prediction, a PU may have sizes such as 2N×2N and N×N(where N is an integer). The PU having a size of N×N may be set to beused in only a specific case. For example, the PU having a size of N×Nmay be set to be used for only a coding unit having the smallest size ormay be set to be used for only the intra prediction. In addition to thePUs having the above-mentioned sizes, PUs having sizes such as N×mN,mN×N, 2N×mN, and mN×2N (where m<1) may be additionally defined and used.

Residual values (a residual block or a residual signal) between thegenerated prediction block and the original block are input to thetransform module 115. The prediction mode information, the motion vectorinformation, and the like used for the prediction are encoded along withthe residual values by the entropy encoding module 130 and aretransmitted to the decoder.

The transform module 115 performs a transform process on the residualblock by transform units and generates transform coefficients. Thetransform unit in the transform module 115 may be a TU and may have aquad tree structure. The size of the transform unit may be determinedwithin a predetermined range of largest and smallest sizes. Thetransform module 115 may transform the residual block using a DCT(Discrete Cosine Transform) and/or a DST (Discrete Sine Transform).

The quantization module 120 may quantize the residual values transformedby the transform module 115 and may generate quantization coefficients.The values calculated by the quantization module 120 may be supplied tothe dequantization module 135 and the rearrangement module 125.

The rearrangement module 125 may rearrange the quantization coefficientssupplied from the quantization module 120. By rearranging thequantization coefficients, it is possible to enhance the codingefficiency in the entropy encoding module 130. The rearrangement module125 may rearrange the quantization coefficients in the form of atwo-dimensional block to the form of a one-dimensional vector throughthe use of a coefficient scanning method. The rearrangement module 125may enhance the entropy encoding efficiency in the entropy encodingmodule 130 by changing the order of coefficient scanning on the basis ofstochastic statistics of the coefficients transmitted from thequantization module.

The entropy encoding module 130 may perform an entropy encoding processon the quantization coefficients rearranged by the rearrangement module125. Examples of the entropy encoding method include an exponentialgolomb method, a CAVLC (Context-Adaptive Variable Length Coding) method,and a CABAC (Context-Adaptive Binary Arithmetic Coding) method. Theentropy encoding module 130 may encode a variety of information such asquantization coefficient information and block type information of acoding unit, prediction mode information, division unit information, PUinformation, transfer unit information, motion vector information,reference picture information, block interpolation information, andfiltering information transmitted from the rearrangement module 125 andthe prediction module 110.

The entropy encoding module 130 may give a predetermined change to aparameter set or syntax to be transmitted, if necessary.

The dequantization module 135 dequantizes the values quantized by thequantization module 120. The inverse transform module 140 inverselytransforms the values dequantized by the dequantization module 135. Theresidual values generated by the dequantization module 135 and theinverse transform module 140 may be merged with the prediction blockpredicted by the prediction module 110 to generate a reconstructedblock.

The filter module 145 applies a deblocking filter, an ALF (Adaptive LoopFilter), an SAO (Sample Adaptive Offset) to the reconstructed picture.

The deblocking filter remove a block distortion generated at theboundary between blocks in the reconstructed picture. The ALF performs afiltering process on the basis of the resultant values of comparison ofthe original picture with the reconstructed picture of which the blockshave been filtered by the deblocking filter. The ALF may be applied onlywhen high efficiency is necessary. The SAO reconstructs offsetdifferences between the residual blocks having the deblocking filterapplied thereto and the original picture by pixels and is applied in theform of a band offset, an edge offset, or the like.

On the other hand, the filter module 145 may not perform a filteringprocess on the reconstructed block used for the inter prediction.

The memory 150 stores the reconstructed block or picture calculated bythe filter module 145. The reconstructed block or picture stored in thememory 150 is supplied to the prediction module 110 that performs theinter prediction.

FIG. 2 is a block diagram schematically illustrating a video decoderaccording to an embodiment of the invention. Referring to FIG. 2, avideo decoder 200 includes an entropy decoding module 210, arearrangement module 215, a dequantization module 220, an inversetransform module 225, a prediction module 230, a filter module 235, anda memory 240.

When a video bitstream is input from the video encoder, the inputbitstream is decoded on the basis of the order in which videoinformation is processed by the video encoder.

For example, when the video encoder uses a variable length coding(hereinafter, referred to as “VLC”) method such as the CAVLC method toperform the entropy encoding process, the entropy decoding module 210may implement the same VLC table as the VLC table used in the videoencoder and may perform the entropy decoding process. When the videoencoder uses the CABAC method to perform the entropy encoding process,the entropy decoding module 210 may perform the entropy decoding processusing the CABAC method to correspond thereto.

Information for generating a prediction block out of the informationdecoded by the entropy decoding module 210 is supplied to the predictionmodule 230, and the residual values entropy-decoded by the entropydecoding module are input to the rearrangement module 215.

The rearrangement module 215 rearranges the bitstream entropy-decoded bythe entropy decoding module 210 on the basis of the rearrangement methodin the video encoder. The rearrangement module 215 reconstructs andrearranges coefficients expressed in the form of a one-dimensionalvector into coefficients in the form of a two-dimensional block. Therearrangement module 215 may be supplied with information associatedwith the coefficient scanning performed by the encoder and may performthe rearrangement using a method of inversely scanning the coefficientson the basis of the scanning order in which the scanning is performed bythe encoder.

The dequantization module 220 may perform dequantization on the basis ofthe quantization parameters supplied from the encoder and thecoefficient values of the rearranged block.

The inverse transform module 225 may perform the inverse DCT and/orinverse DST of the DCT and DST, which has been performed by thetransform module of the encoder, on the quantization result from thevideo encoder. The inverse transform may be performed on the basis of atransfer unit or a division unit of a picture determined by the encoder.The transform module of the encoder may selectively perform the DCTand/or DST depending on plural information pieces such as the predictionmethod, the size of a current block, and the prediction direction, andthe inverse transform module 225 of the decoder may perform the inversetransform on the basis of the transform information on the transformperformed by the transform module of the encoder.

The prediction module 230 may generate a prediction block on the basisof prediction block generation information supplied from the entropydecoding module 210 and the previously-decoded block and/or pictureinformation supplied from the memory 240. The reconstructed block may begenerated using the prediction block generated by the prediction module230 and the residual block supplied from the inverse transform module225. When the prediction mode of a current PU is an intra predictionmode, an intra prediction process of generating a prediction block onthe basis of pixel information of a current picture may be performed.

When the prediction mode for a current block is the inter predictionmode, the inter prediction process on the current PU may be performed onthe basis of information included in at least one of a previous pictureand a subsequent picture of the current picture is used as a referencepicture. At this time, motion information necessary for the interprediction of the current PU, for example, information on motionvectors, reference picture indices, and the like, can be derived from askip flag, a merge flag, and the like received from the encoder.

The reconstructed block and/or picture may be supplied to the filtermodule 235. The filter module 235 performs a deblocking filteringprocess, an SAO (Sample Adaptive Offset) process, and/or an adaptiveloop filtering process on the reconstructed block and/or picture.

The memory 240 may store the reconstructed picture or block for use as areference picture or a reference block and may supply the reconstructedpicture to an output module.

On the other hand, the filter modules of the encoder and the decoder mayapply the deblocking filter, the SAO (Sample Adaptive Offset), and theALF (Adaptive Loop Filter) as an in-loop filter, as described above.

The deblocking filter removes artifacts between blocks due toprediction, transform, and quantization in the unit of blocks. Thedeblocking filter is applied to a prediction unit edge or a transformunit edge and may set a predetermined smallest block size forapplication of the deblocking filter.

A boundary strength (BS) of a horizontal or vertical filter boundary isfirst determined to apply the deblocking filter. It is determined in theunit of blocks whether to perform a filtering process on the basis ofthe BS. When it is determined that the filtering process should beperformed, a filter to be applied is determined. The filter to beapplied may be selected from weak filters and strong filters. Thefiltering module applies the selected filter to the boundary of thecorresponding block.

The SAO is a process of reconstructing an offset difference between apicture subjected to the deblocking filtering process and the originalpicture in the unit of pixels. The SAO serves to compensate for a codingerror. Here, the coding error may be based on quantization or the like.

As described above, the SAO is classified into two types of a bandoffset and an edge offset.

FIG. 3 is a diagram schematically illustrating the band offset.

In order to apply the band offset, pixels in an SAO application unit areclassified depending on intensities of the pixels. The entire intensityrange may be divided into a predetermined number of intensity intervals,that is, bands. Each band includes pixels having intensities in thecorresponding intensity interval. The offset to be applied may bedetermined for each band.

In case of a picture including N-bit pixels, the number of intensityintervals ranges from 0 to 2^(N)−1. For example, 8-bit pixels areclassified into 0 to 255 intensity intervals. FIG. 3 illustrates anexample where the entire intensity range is divided into 32 bands havingthe same intensity gap.

Referring to FIG. 3, the intensity intervals of the bands are 8. The 32bands may be divided into a first group at the center and a second groupneighboring the first group. The first group includes 16 bands and thesecond group includes 16 bands. The offset may be applied to each bandand the offset value for each band may be applied to the decoder.

In the decoder, pixels are grouped and the offset value transmitted foreach band is applied to the groups.

The ALF compensates for a coding error using a Wiener filter. The ALF isglobally applied to a slice unlike the SAO. The ALF may be applied afterthe SAO is applied, or may be applied only when HE (High Efficiency) isnecessary. Information (such as a filter coefficient, ON/OFFinformation, and a filter shape) for applying the ALF may be transmittedto the decoder through the use of a slice header. Various shapes such asa two-dimensional diamond shape and a two-dimensional cross shape may beused as the shape of the filter used for the ALF.

On the other hand, it may be considered that the SAO is adaptivelyapplied depending on the region to which the SAO is applied, that is,the SAO application unit. Hereinafter, a method of performing anadaptive SAO in the system according to the invention will be describedby the band offset and the edge offset.

<Adaptive Application of Band Offset>

FIG. 4 is a diagram illustrating an example of histograms based oncharacteristics of a predetermined picture. Specifically, FIG. 4illustrates histograms based on luma characteristics as in FIG. 11( b).

Referring to FIG. 4, it can be seen that a histogram has variousdistributions depending on the characteristics of a picture. Therefore,a pixel range may be adaptively divided and the band offset may beapplied thereto. That is, a method of adaptively setting bands of anintensity range of pixels and applying an offset may be considered.

For example, when histograms of a picture of a corresponding block areconcentrated on the central part in the entire intensity range, a methodof dividing the central part more densely to set the bands and dividingthe side parts less densely to set the bands may be considered.Specifically, when pixels of N bits are concentrated on the central partin the entire intensity range (0 to 2^(N)−1), M bands having smallintensity intervals may be set in the central part and L bands havinglarge intensity intervals may be set in the side part.

On the contrary, when histograms of a picture of the corresponding blockare concentrated on the side parts in the entire intensity range, amethod of dividing the side parts more densely to set the bands anddividing the central part less densely to set the bands may beconsidered. Specifically, when pixels of N bits are concentrated on theside parts in the entire intensity range (0 to 2^(N)−1), M bands havingsmall intensity intervals may be set in the side parts and L bandshaving large intensity intervals may be set in the central part.

FIG. 5 is a diagram schematically illustrating an example of a method ofadaptively dividing an intensity range of the total pixels and applyingthe band offset thereto. FIG. 5 illustrates an example where pixels areconcentrated on the central part.

In the example illustrated in FIG. 5, when the pixel value range, thatis, the pixel intensity range have 256 (0 to 2⁸−1) pixel values, thefirst group in the central part may be densely divided into 16 bands by4 pixel values (for example, four intensity intervals) and the secondgroup in the side parts may be roughly divided into 12 bands by 16 pixelvalues.

When histograms of the picture of the corresponding block areconcentrated on the side parts in the entire intensity range, the firstgroup in the central part is divided into 12 bands by 16 pixel valuesand the second group in the side parts may be divided into 16 bands by 4pixel values.

On the other hand, a method of classifying the entire intensity rangeinto more band groups than two band groups depending on the SAOapplication unit may be considered. By classifying the entire intensityrange into more bands groups and applying the offset thereto, it ispossible to enhance an effect of picture reconstruction. For example,the bands may be classified into N groups instead of two groups and afiner offset may be applied to some pixel value ranges.

FIG. 6 is a diagram schematically illustrating an example of the methodof adaptively dividing the entire intensity range of all pixels andapplying a band offset thereto.

FIG. 6 illustrates an example where the entire intensity range isdivided into bands, the bands are classified into four groups, and theband offset is applied thereto. As illustrated in FIG. 6, by dividingthe entire intensity range into more groups than two groups andtransmitting offset information for each group, it is possible to betterreflect local characteristics of a picture.

On the other hand, when the pixel value range covered by each group,that is, the intensity section, is fixed at the time of applying theband offset, relevant information is transmitted even when theoccurrence frequency of a specific band in the group is small or theband offset value of the corresponding band is 0. Therefore, in order toprevent this problem, the encoder may transmit the range of the bandoffset applied to a current picture. For example, the encoder maytransmit information on what bit depth section, that is, what intensitysection, in the current picture is subjected to the band offset to thedecoder.

When the offsets of a current picture mainly occur in a specific pixelvalue (for example, intensity) range and a band offset is applied tobands with uniform intervals, it is possible to prevent transmission ofunnecessary offset information or performing of an unnecessary offset bydesignating a band in which application of the band offset is startedand a band in which application of the band offset is ended.

When a pixel value (for example, intensity) range in which an offsetmainly occurs and to which a band offset should be applied in a currentpicture ranges from 32 to 160 and the size of each band in the pixelvalue (for example, intensity) range of 0 to 256 is 8, the encoder maytransmit information such as band_start and band_end indicating a bandin which application of the band offset is started and a band in whichapplication of the band offset is ended out of total 32 bands to thedecoder. When application of the band offset is started in the fourthband out of the total bands and the application of the band offset isended in the twentieth band, information such as band_start=4 andband_end=20 may be transmitted.

The occurrence frequency of a pixel value belonging to each band, thatis, the occurrence frequency of each band, may be counted and the offsetvalue of the band offset of only a band having the occurrence frequencyof the pixel value may be transmitted.

For example, when bands having high occurrence frequencies out of 32bands 0 to 31 are 0, 4, 5, 6, 7, 9, 12, 15, 19, 20, 23, and 25, theencoder may transmit offset values in the band offset to be applied toonly the bands having high occurrence frequencies to the decoder and maynot transmit offset values in the band offset to be applied to the bandshaving low occurrence frequencies.

In this case, the encoder may additionally transmit information on whatbands the offset values are applied to the decoder.

As a second type of SAO, there is an edge offset considering edgeinformation for each pixel. The edge offset is applied in considerationof an edge direction with respect to a current pixel and intensities ofthe current pixel and neighboring pixels.

FIG. 7 is a diagram illustrating examples of representative forms ofedges which can occur in a block by directions. Referring to FIG. 7,FIGS. 7( a) to 7(d) illustrate an edge having a direction of 0 degrees,an edge having a direction of 90 degrees, an edge having a direction of135 degrees, and an edge having a direction of 45 degrees, respectively.Therefore, four types for a single filtering unit, that is, an SAOapplication unit (of which the smallest unit is a LCU) may be used asthe edge offset depending on the angles or directions of the edges. Forthe purpose of convenience of explanation, four edge types of the SAOapplication unit illustrated in FIG. 7 are referred to as edge types ofthe edge offset.

FIG. 8 is a diagram illustrating four representative edge types of theedge offset with respect to a current pixel (C). In FIG. 8, FIG. 8( a)illustrates an edge of 0 degrees in one dimension, FIG. 8( b)illustrates an edge of 90 degrees in one dimension, FIG. 8( c)illustrates an edge of 135 degrees in one dimension, and FIG. 8( d)illustrates an edge of 45 degrees in one dimension. Four edge types maybe used depending on the edge types of the four directions illustratedin FIG. 8. An offset corresponding to one of the four edge types may beapplied to each SAO application unit.

After the edge type is determined, the relationship between a currentpixel and neighboring pixels may be considered to apply an edge offset.

FIG. 9 is a diagram schematically illustrating an example where acurrent pixel is compared in intensity with neighboring pixels and theintensities are grouped into four categories. Referring to FIG. 9, FIGS.9( a) to 9(d) illustrate distributions of a current pixel (C) andneighboring pixels for each category. The category illustrated in FIG.9( a) indicates a case where intensities of two neighboring pixels aregreater than that of the current pixel (C). The category illustrated inFIG. 9( b) indicates a case where the intensity of one pixel of twoneighboring pixels of the current pixel is smaller than that of thecurrent pixel. The category illustrated in FIG. 9( c) indicates a casewhere the intensity of one pixel of two neighboring pixels of thecurrent pixel is greater than that of the current pixel. The categoryillustrated in FIG. 9( d) indicates a case where intensities of twoneighboring pixels of the current pixel are greater than that of thecurrent pixel.

For example, FIGS. 9( a) and 9(b) illustrate cases where the intensityof the current pixel is greater or smaller than those of the neighboringpixels. FIGS. 9( b) and 9(d) may appear when the current pixel islocated at a boundary of a predetermined region.

Table 1 schematically shows four categories illustrated in FIG. 9.

TABLE 1 Category Condition 1 Intensity of C < Intensities of twoneighboring pixels 2 Intensity of C < Intensity of one neighboring pixeland intensity of C = Intensity of one neighboring pixel 3 Intensity ofC > Intensity of one neighboring pixel and intensity of C = Intensity ofone neighboring pixel 4 Intensity of C > Intensities of two neighboringpixels 0 No correspondence

In Table 1, C represents a current pixel. Category 1 in Table 1corresponds to FIG. 9( a), Category 2 in Table 1 corresponds to FIG. 9(b), Category 3 in Table 1 corresponds to FIG. 9( c), and Category 4 inTable 1 corresponds to FIG. 9( d).

The encoder transmits an edge offset value for each category. Thedecoder may add the edge offset value corresponding to a category to theedge type of the pixels to reconstruct the pixels. For example, after itis determined what of four edge types illustrated in FIG. 7 the currentpixel belongs to, the category of the categories shown in Table 1 towhich the current pixel belongs may be determined and the offset of thecorresponding category may be applied to the current pixel.

On the other hand, filtering units, that is, SAO application units, areunits having a size equal to or larger than the LCU (Largest CodingUnit) and are units aligned with the boundary of the LCUs.

A unit to which the SAO is applied is a region obtained by dividing onepicture in a quad tree structure. The encoder may determine whether toapply the SAO, the offset type, and the offset values for each SAOapplication unit and may transmit the determined information to thedecoder. Here, determining of the offset type means that which of pluralband offsets and plural edge offsets to apply is determined.

FIG. 10 is a diagram schematically illustrating the SAO applicationunits. FIG. 10 illustrates the SAO application units obtained bydividing a WQVGA (416×240) picture in a quad tree structure. Each SAOapplication unit is larger than an LCU and may be divided along theboundaries of the LCUs.

As described above, the smallest unit of the SAO application unit is theLCU, but in case of a small picture, the size of the LCU may be anexcessively large size to apply a single offset thereto. For example,when the LCU has a size of 64×64, the size of the LCU may be anexcessively large size to reconstruct an original picture using only asingle offset. If two or more different edges are present in a singleLCU, two or more offsets may be used for the single LCU.

When plural edge offsets are applied to a single SAO application unit,plural edges types out of FIGS. 8( a) to 8(d) may be selected andapplied depending on the directions of the edges in the region.

<SAO Syntax Structure>

Table 2 schematically shows an example of a sequence parameter setsyntax as a syntax structure for applying the SAO.

TABLE 2 seq_parameter_set_rbsp( ) { C Descriptor  ...  sao_used_flag 1u(1)  ... }

Table 2 shows an example of information indicating whether the SAO isapplied to a current sequence. For example, when the value ofsao_used_flag in the syntax shown in Table 2 is 0, it means that the SAOcannot be used (disabled) for the current sequence. When the value ofsao_used_flag is 1, it means that the SAO can be used (enabled) for thecurrent sequence.

Table 3 schematically shows an example of a slice header syntax as asyntax structure for applying the SAO.

TABLE 3 slice_header( ) { C Descriptor  ...  sao_param( ) 2 }

An SAO parameter (sao_param( )) for applying the SAO may be indicated bythe slice header syntax shown in Table 3.

Table 4 schematically shows an example of an SAO parameter syntax as asyntax structure for applying the SAO.

TABLE 4 sao_param( ) { C Descriptor  sao_flag 2 u(1)|ae(v)  if( sao_flag) {   sao_split_param( 0, 0, 0 )   sao_offset_param( 0, 0, 0 )  } }

When an SAO parameter is indicated using the slice header syntax,parameters necessary for applying the SAO are transmitted over the SAOparameter syntax. The parameters to be transmitted includesao_split_param related to division of the SAO application region andsao_offset_param related to an offset to be applied in the SAO, as inthe example shown in Table 4.

In the example shown in Table 4, when the value of sao_flag is 1, itmeans that the SAO can be applied (enabled) to at least a part of acurrent picture. When the value of sao_flag is 0, it means that the SAOcannot be applied (disabled) to the entire current picture. Therefore,when the value of sao_flag is 1, the SAO parameters may be indicated.

Table 5 schematically shows an example of a sao_split_param related todivision out of the SAO parameters as a syntax structure for applyingthe SAO.

TABLE 5 sao_split_param( x, y, Depth ) { C Descriptor if( Depth <MaxSplitLevel ) split_flag[ Depth ][ y ][ x ] = sao_split_flag 2u(1)|ae(v) else split_flag[ Depth ][ y ][ x ] = 0 if( split_flag[ Depth][ y ][ x ] ) { pqao_split_param( x + 0, y + 0, Depth + 1 )pqao_split_param( x + 1, y + 0, Depth + 1 ) pqao_split_param( x + 0, y +1, Depth + 1 ) pqao_split_param( x + 1, y + 1, Depth + 1 ) } }

In the example shown in Table 5, sao_split_param(x, y, Depth) indicateswhether to additionally divide the SAO application unit at the positiondesignated by (x, y) and the depth designated by “Depth”. When the valueof sao_split_param is 0, it means that a current region is a leaf.Therefore, the current region is not divided any more for application ofthe SAO. When the value of sao_split_param is 1, it means that thecurrent region can be additionally divided into four child regions. Whenthe SAO application region is divided, division parameters(pqao_split-param) for four divided regions may be indicated.

When sao_split_param(x, y, Depth) indicates that the SAO applicationunit should be additionally divided, pqao_split-param indicates whetherto additionally divide the SAO application unit for each divided region.In that whether to divide the SAO application unit at the correspondingdepth is indicated, the syntax sao_split_param may be used again for thedivided regions instead of the syntax pqao_split-param, where the depthof the indicated region may be changed. For example, when the region ofwhich division will be indicated and the depth thereof are (x0, y0,saoDepth) in indicating whether to divide a region for applying the SAOand sao_split_param(x0, y0, saoDepth) indicates that the correspondingregion (x0, y0) should be divided, the depth may be adjusted to“saoDepth+1” and whether to divide the divided regions (x0+0, y0+0),(x0+0, y0+1), (x0+1, y0+0), and (x0+1, y0+1) may be indicated again.

Table 6 schematically shows an example of a syntax structure forapplying sao_split_param to the divided regions again.

TABLE 6 sao_offset_param( x0, y0, saoDepth ) {  if( sao_split_flag[saoDepth ][ x0 ][ y0 ] ) {   sao_offset_param( x0 + 0, y0 + 0,saoDepth + 1 )   sao_offset_param( x0 + 1, y0 + 0, saoDepth + 1 )  sao_offset_param( x0 + 0, y0 + 1, saoDepth + 1 )   sao_offset_param(x0 + 1, y0 + 1, saoDepth + 1 )  } else {   sao_type_idx[ saoDepth ][ x0][ y0 ]   if( sao_type_idx[ saoDepth ][ x0 ][ y0 ] != 0 )    for( i = 0;i < NumSaoClass; i++ )     sao_offset[ saoDepth ][ x0 ][ y0 ][ i ]  } }

In Table 6, NumSaoClass indicates the number of SAO categories or SAOoffsets.

Table 7 schematically shows an example of the syntax sao_offset_paramrelated to an offset out of the SAO parameters as a syntax structure forapplying the SAO.

TABLE 7 sao_offset_param ( x, y, Depth ) { C Descriptor if( split_flag[Depth ][ y ][ x ] ) { sao_offset_param ( x + 0, y + 0, Depth + 1 )sao_offset_param ( x + 1, y + 0, Depth + 1 ) sao_offset_param ( x + 0,y + 1, Depth + 1 ) sao_offset_param ( x + 1, y + 1, Depth + 1 ) } else {type_idx[ Depth ][ y ][ x ] = sao_type_idx 2 ue(v)|ae(v) if(sao_type_idx != 0 ) { if( sao_type_idx > 4 ) { // offset type isbandoffset start_offset end_offset } else { start_offset = 0 end_offset= PqaoOffsetNum[sao_type_idx] } for( i = start_offset; i < end_offset;i++ ) offset[ Depth ][ y ][ x ][ i ] = 2 se(v)|ae(v) sao_offset } } }

Referring to Table 7, when an SAO application region is divided, theoffset parameter may be indicated for each divided region.

When an SAO application region is not divided any more, the offset typeof the corresponding SAO application region is indicated.

In the example shown in Table 7, sao_type_index indicates the offsettype to be applied to the current region. The number of SAO offsets orthe number of SAO categories may be determined depending on the offsettype (sao type, sao_type_idx) applied to the current region. An exampleof the syntax information indicating the number of SAO offsets or thenumber of SAO categories depending on the offset type isPqaoOffsetNum[sao_type_idx] shown in Table 6.

In the example shown in Table 7, start_offset indicates the smallestnumber of band offsets or edge offsets to be used. If start_offset isnot available, it may be estimated that start_offset has a value of 0.end_offset indicates the largest number of band offsets or edge offsetsto be used. When end_offset is not available, the value of end_offsetmay be set to the number of SAO categories (the number of offsets)PqaoOffsetNum[sao_type_idx] determined depending on the SAO type(sao_type_idx) as described above.

Table 8 schematically shows an example of an SAO offset type. Asdescribed above with reference to Table 7, the number of SAO category(the number of offsets) may be determined depending on the offset type.

TABLE 8 SAO type index Number of SAO Edge type sao_type_idx categories(reference) 0 0 non-applied 1 4 1D 0-degree edge 2 4 1D 90-degree edge 34 1D 135-degree edge 4 4 1D 45-degree edge 5 16 central band 6 16 sideband

As shown in Table 8, the SAO type index may indicate one of the edgeoffsets and the band offsets. Table 8 shows an example where the totalbands are divided into two groups and the band offset is appliedthereto. The SAO type index indicates one of four edge offsets and twoband offsets. The offset value is set depending on the category of eachSOA type. For example, in case of the edge offset, the offset value maybe set for each edge type by four categories corresponding to theintensities of the current pixel and the neighboring pixels.

Table 9 schematically shows an example of the SAO offset type when theband groups are adaptively divided and the band offset is appliedthereto.

TABLE 9 SAO type index Number of SAO Edge type (sao_type_idx) categories(reference) 0 0 non-applied 1 4 1D 0-degree edge 2 4 1D 90-degree edge 34 1D 135-degree edge 4 4 1D 45-degree edge 5 16 central band 6 12 sideband

In the example shown in Table 9, the number of categories varies in thecentral bands and the side bands. For example, in case of 256 pixels,the central band group and the side band group each including 16 bandsby 8 pixel values are constructed in Table 8, but the central band groupincluding 16 bands by 4 pixel values and the side band group including12 bands by 15 pixel values are used to apply the band offset in Table9. Therefore, the offset may be more densely applied to the centralbands.

Table 10 schematically shows another example of the SAO offset type whenthe band groups are adaptively divided and the band offset is appliedthereto.

TABLE 10 SAO type index Number of SAO Edge type (sao_type_idx)categories (reference) 0 0 non-applied 1 4 1D 0-degree edge 2 4 1D90-degree edge 3 4 1D 135-degree edge 4 4 1D 45-degree edge 5 12 centralband 6 16 side band

Table 10 shows an example where the side band group is more denselydivided and the band offset is applied thereto, unlike the example shownin Table 9. For example, in Table 10, the band offset is applied usingthe central band group including 12 bands by 16 pixel values and theside band group including 16 bands by 4 pixel values. Therefore, theoffset may be applied more densely to the side bands.

Table 11 shows an example of a table related to the SAO type where moreband groups are designated and the band offset is applied thereto.

TABLE 11 SAO type index Number of SAO Edge type (sao_type_idx)categories (reference) 0 0 non-applied 1 4 1D 0-degree edge 2 4 1D90-degree edge 3 4 1D 135-degree edge 4 4 1D 45-degree edge 5 8 Firstband 6 8 Second band 7 8 Third band 8 8 Fourth band

In the example shown in Table 11, each band group includes 8 bands by 8pixel values. The band groups may be sequentially grouped from the leftof the total bands as illustrated in FIG. 6.

In Table 7, the SAO type to be applied to the current pixel out of theSAO types shown in Tables 8 to 11 may be indicated by sao_type_idx. Withreference to Table 7 and Tables 8 to 11, when the value of sao_type_idxis equal to or greater than 5, the band offset is applied.

Table 12 schematically shows another example of the syntaxsao_offset_param related to an offset out of the SAO parameters as asyntax structure for applying the SAO.

TABLE 12 sao_offset_param ( x, y, Depth ) { C Descriptor  if(split_flag[ Depth ][ y ][ x ] ) { sao_offset_param ( x + 0, y + 0,Depth + 1 ) sao_offset_param ( x + 1, y + 0, Depth + 1 )sao_offset_param ( x + 0, y + 1, Depth + 1 ) sao_offset_param ( x + 1,y + 1, Depth + 1 )  } else { type_idx[ Depth ][ y ][ x ] = sao_type_idx2 ue(v)|ae(v) if( sao_type_idx != 0 ) {  if( sao_type_idx > 4 ) { //offset type is  bandoffset total_offset_num_minus_one for( i=0;i<total_offset_num_minus_one +1; i++) {  offset_idx[i]  offset[ Depth ][y ][ x ][  offset_idx[i] ] = sao_offset }  } else { for( i = 0; i <PqaoOffsetNum[sao_type_idx]; i++ )  offset[ Depth ][ y ][ x ][ i ] =sao_offset 2 se(v)|ae(v)  } }  } }

Table 12 shows an example of a syntax structure in which only aneffective band offset is transmitted. The effective band offset means anavailable band offset.

Since only information on the effective band offset is transmitted, itis necessary to transmit information on the number of band offsets to beapplied, information indicating the band offsets, information indicatingthe offset values, and the like.

Here, total_offset_num_minus_one indicates the total number of offsetsof the band offset. offset_idx[i] indicates to what category the bandoffset indicated by sao_type_idx corresponds. sao_offset indicates theoffset value of the category indicated by the offset_idx[i] at thecorresponding position and depth.

As described above, plural edge offsets may be applied to a single SAOapplication unit. Table 13 schematically shows an example of a syntaxstructure when plural edge offsets are applied to a single SAOapplication unit.

TABLE 13 sao_offset_param ( x, y, Depth ) { C Descriptor  if( splitflag[ Depth ][ y ][ x ] ) { sao_offset_param ( x + 0, y + 0, Depth + 1 )sao_offset_param ( x + 1, y + 0, Depth + 1 ) sao_offset_param ( x + 0,y + 1, Depth + 1 ) sao_offset_param ( x + 1, y + 1, Depth + 1 )  } else{ type_idx[ Depth ][ y ][ x ] = sao_type_idx 2 ue(v)|ae(v) if(sao_type_idx != 0 ) {  if( sao_type_idx <5 ) {  num_edge_offset  for( k= 0; k < num_edge_offset; k++ ) { for( i = 0; i < PqaoOffsetNum[sao_type_idx ]; i++ )  offset[k][ Depth ][ y ][ x ][ i ] = sao_offset  }else { for( i = 0; i < PqaoOffsetNum[ sao_type_idx ]; i++ )  offset[0][Depth ][ y ][ x ][ i ] = sao_offset 2 se(v)|ae(v)  } }  } }

With reference to Table 13 and Tables 8 to 11, when the value ofsao_type_idx is less than 5, the edge offset is applied. Here,num_edge_offset indicates the total number of offsets of the edgeoffset.

With reference to Table 13, the edge offsets corresponding to the numberindicated by num_edge_offset may be applied to the SAO applicationregion.

<SAO Application to Chroma>

On the other hand, in consideration of the difference between luma andchroma in applying the SAO, the SAO may be applied to chroma pixels.

FIG. 11 illustrates local distributions of histograms for the samepicture.

For example, FIG. 11( b) illustrates a histogram difference between aluma original picture and a reconstructed picture in Regions A and B inFIG. 11( a) which is in a picture of the same video.

FIG. 11( c) illustrates a histogram difference between a chroma (Cr)original picture and a reconstructed picture in Regions A and B in FIG.11( a). FIG. 11( d) illustrates a histogram difference between a chroma(Cb) original picture and a reconstructed picture in Regions A and B inFIG. 11( a).

Referring to FIG. 11, it can be seen that a difference in picturecharacteristics between luma and chroma is present in the same picture.Therefore, in addition to the offset of a signal in luma pixels, theoffset of a signal in chroma pixels may be independently transmitted inconsideration of the characteristic difference between a luma signal anda chroma signal as in the example illustrated in FIG. 11. For example,in consideration of the number of luma pixels and the number of chromapixels, an offset may be applied to the chroma pixels with a bit depthsubstantially smaller than the bit depth in the luma pixels.

For example, when the range of a chroma signal, that is, the pixel valuerange of the chroma pixels, is from 0 to 2^(N)−1 (where N is a bitdepth), the magnitude of the entire bit depth, that is, the pixel valuerange, may be divided as in the example illustrated in FIG. 12 or 13.

FIG. 12 is a diagram schematically illustrating an example where a bandoffset is applied to only some bands of the total bands for the chromapixels.

Referring to FIG. 12, chroma pixels may be allocated to the centralbands including K bands at the center out of the total 2*K bands and theband offset may be applied thereto.

The offset values of the indices (1, 2, . . . , K) allocated to therespective bands may be transmitted from the encoder to the decoder. Theindices of the offset values for the side bands to which the band offsetis not applied may be set to 0 and the offset for the chroma pixels maynot be indicated. An index having a value of 0 may indicate that theband offset should not be applied thereto, or may indicate that theoffset value of the band offset is 0.

FIG. 13 is a diagram schematically illustrating another example where aband offset is applied to only some bands of the total bands for thechroma pixels.

Referring to FIG. 12, chroma pixels may be allocated to the remainingband including K bands at the sides out of the total 2*K bands and theband offset may be applied thereto.

The offset values of the indices (1, 2, . . . , K/2, K/2+1, K) allocatedto the respective bands may be transmitted from the encoder to thedecoder. The indices of the offset values for the central bands to whichthe band offset is not applied may be set to 0 and the offset for thechroma pixels may not be indicated. An index having a value of 0 mayindicate that the band offset should not be applied thereto, or mayindicate that the offset value of the band offset is 0.

In the examples illustrated in FIGS. 12 and 13, when it is assumed thatthe value of K is set to 16, the entire pixel value range may be dividedinto 32 bands, the bands may be classified into two groups of 16 bandsat the center and the 16 bands at the side, and the band offset may beapplied thereto.

By considering that the variance of the signals (pixel values) for thechroma pixels is smaller than that of the signals (pixel values) for theluma pixels, the total number of bands may be reduced and K=8 may beset. When K=8 is set, the total number of bands for applying the bandoffset is 16. The band offset may be applied to the chroma pixels using8 central bands and 8 side bands. Here, the signals (luma signals) forthe luma pixels are the pixels values (for example, intensities) of theluma pixels and are hereinafter referred to as “luma signals” for thepurpose of convenience of explanation.

Table 14 schematically shows an example of the syntax sao_offset_paramrelated to an offset out of the SAO parameters as a syntax structure forapplying the SAO to chroma pixels.

TABLE 14 sao_offset_param ( x, y, Depth ) { C Descriptor  if(split_flag[ Depth ][ y ][ x ] ) { sao_offset_param ( x + 0, y + 0,Depth + 1 ) sao_offset_param ( x + 1, y + 0, Depth + 1 )sao_offset_param ( x + 0, y + 1, Depth + 1 ) sao_offset_param ( x + 1,y + 1, Depth + 1 )  } else { type_idx[ Depth ][ y ][ x ] = sao_type_idx2 ue(v)|ae(v) if( sao_type_idx != 0 ) {  for( i = 0; i < PqaoOffsetNum[  sao_type_idx ]; i++ ) offset[ Depth ][ y ][ x ][ i ] = sao_offset 2se(v)|ae(v)  type_idx[ Depth ][ y ][ x ] = sao_type_cr_idx  if(sao_type_cr_idx != 0 ) { for( i = 0; i < PqaoOffsetNum[ sao_type_cr_idx]; i++ )  offset[ Depth ][ y ][ x ][ i ] =  sao_cr_offset  }  type_idx[Depth ][ y ][ x ] = sao_type_cb_idx  if( sao_type_cb_idx != 0 ) { for( i= 0; i < PqaoOffsetNum[ sao_type_cb_idx ]; i++ )  offset[ Depth ][ y ][x ][ i ] =  sao_cb_offset  } }  } }

Referring to Table 14, sao_type_cr_idx indicates an offset type of achroma (Cr) signal. sao_type_cb_idx indicates an offset type of a chroma(Cb) signal. sao_cr_offset indicates an offset value of a chroma (Cr)signal. sao_cb_offset indicates an offset value of a chroma (Cb) signal.

In the example shown in Table 14, when the offset type to be applied tothe chroma (Cr) signals is indicated by sao_type_cr_idx, the offsetvalue indicated by sao_cr_offset may be applied to the current pixel.When the offset type to be applied to the chroma (Cb) signals isindicated by sao_type_cb_idx, the offset value indicated bysao_cb_offset may be applied to the current pixel.

On the other hand, additional information may be reduced whilemaintaining performance of the chroma offset in consideration of thecharacteristic difference between chroma and luma. For example, a chromasignal is smaller in edge component and simpler than a luma signal.

Therefore, by setting two categories for the edge offsets withoutsetting four categories as in case of luma, it is possible to reduce theadditional information. For example, in the edge offset table shown inTable 1, Category 1 and Category 3 may be merged into a single categoryand Category 2 and Category 4 may be merged into a single category. Bymerging the categories, it is possible to reduce the amount of offsetvalue data to be transmitted when the edge offset is applied.

Table 15 schematically shows an example of edge offset categories to beapplied to chroma pixels.

TABLE 15 Category Condition 1 Intensity of C < Intensities of twoneighboring pixels, or intensity of C < Intensity of one neighboringpixel and intensity of C = Intensity of one neighboring pixel 2Intensity of C > Intensity of one neighboring pixel and intensity of C =Intensity of one neighboring pixel, or Intensity of C > Intensities oftwo neighboring pixels 0 No correspondence

Referring to Table 15, when a direction (angle) of an edge isdetermined, a case in which the intensity of a current pixel (C) is lessthan the intensities of two neighboring pixels forming an edge or a casein which the intensity of the current pixel (C) is less than theintensity of one neighboring pixel are set to a single category(Category 1).

When a direction (angle) of an edge is determined, a case in which theintensity of the current pixel (C) is greater than the intensities oftwo neighboring pixels forming an edge or a case in which the intensityof the current pixel (C) is greater than the intensity of oneneighboring pixel are set to a single category (Category 2).

Table 16 shows an example of an SAO type index table when the categoriesfor the edge offsets are merged as shown in Table 15 and the number ofbands for applying the band offset is set as illustrated in FIG. 12.

TABLE 16 SAO type index Number of SAO Edge type Sao_type_idx categories(reference) 0 0 non-applied 1 2 1D 0-degree edge 2 2 1D 90-degree edge 32 1D 135-degree edge 4 2 1D 45-degree edge 5 8 central band 6 0 sideband

Referring to Table 16, for chroma pixel, the number of SAO categoriesmay be reduced to two for the edge offset, and the offset may be appliedto 8 bands at the center for the band offset, whereby it is possible toreduce an amount of information to be transmitted.

Table 17 shows an example of an SAO type index table when the categoriesfor the edge offsets are merged as shown in Table 15 and the number ofbands for applying the band offset is set as illustrated in FIG. 13.

TABLE 17 SAO type index Number of SAO Edge type Sao_type_idx categories(reference) 0 0 non-applied 1 2 1D 0-degree edge 2 2 1D 90-degree edge 32 1D 135-degree edge 4 2 1D 45-degree edge 5 0 central band 6 8 sideband

Referring to Table 17, for chroma pixel, the number of SAO categoriesmay be reduced to two for the edge offset, and the offset may be appliedto 8 bands at the center for the band offset, whereby it is possible toreduce an amount of information to be transmitted.

Table 14 shows an example of a syntax structure when the same filteringpartition is applied to the signals of luma pixels and the signals ofchroma pixels, that is, when the same SAO application unit is used forthe luma pixels and the chroma pixels.

In this regard, independent filtering partitions may be used for thesignals of luma pixels and the signals of chroma pixels. That is,independent SAO application units may be used for luma pixels and chromapixels.

Table 18 schematically shows an example of a syntax structure whenindependent partitions are used for the luma pixels and the chromapixels.

TABLE 18 sao_param( ) { C Descriptor sao_flag 2 u(1)|ae(v) if( sao_flag) { sao_split_param( 0, 0, 0 ) sao_offset_param( 0, 0, 0, 0 )sao_flag_cb if( sao_flag_cb ) { sao_offset_param( 0, 0, 0, 1 ) }sao_flag_cr if( sao_flag_cr ) { sao_offset_param( 0, 0, 0, 2 ) } } }

In the example shown in Table 18, when the value of sao_flag is 1, itindicates that the SAO may be used for the luma signal. When the valueof sao_flag is 0, it indicates that the SAO is not used for the lumasignal.

When the value of sao_flag_Cb is 1, it indicates that the SAO may beused for the Cb signal. When the value of sao_flag_Cb is 0, it indicatesthat the SAO is not used for the Cb signal.

When the value of sao_flag_Cr is 1, it indicates that the SAO may beused for the Cr signal. When the value of sao_flag_Cr is 0, it indicatesthat the SAO is not used for the Cr signal.

Referring to Table 18, x1 and x2 in sao_offset_param(x1, x2, x3, x4)specify the position of a region to which sao_offset_param is applied,x3 specifies the depth of the region to which sao_offset_param isapplied. And x4 indicates that which of luma, Cr, and Cbsao_offset_param is for.

When all the values of sao_flag, sao_flag_cr, and sao_flag_cb are 1, theSAO is applied to luma, Cr and Cb and necessary parameters such assao_split_param and sao_offset_param may be indicated. The SAOparameters may be transmitted as in the examples illustrated in FIGS. 18and 19 to be described later.

Table 18 schematically shows an example of a syntax structure whenindependent partitions are used for the luma pixels and the chromapixels.

TABLE 19 sao_split_param( x, y, Depth, component) { C Descriptor if(Depth < MaxSplitLevel ) split_flag[ Depth ][ y ][ x ] = sao_split_flag 2u(1)|ae(v) Else split_flag[ Depth ][ y ][ x ] = 0 if( split_flag[ Depth][ y ][ x ] ) { sao_split_param( x + 0, y + 0, Depth + 1, component)sao_split_param( x + 1, y + 0, Depth + 1, component) sao_split_param(x + 0, y + 1, Depth + 1, component) sao_split_param( x + 1, y + 1,Depth + 1, component) } }

Referring to Table 19, when the value of sao_split_flag is 0, itindicates that a current region is a leaf. Therefore, the current regionis not divided any more. When the value of sao_split_flag is 1, thecurrent region is additionally divided into four child regions. Here,(x, y) in sao_split_flag(x, y, Depth, component) indicates the positionof the region and Depth thereof indicates the depth of the region. Inaddition, “component” indicates to which of luma, Cr, and Cbsao_split_flag relates.

When the value of sao_split_flag is 1 and the region is additionallydivided, the parameters sao_split_param related to luma, Cr, and/or Cbin the four divided regions may be transmitted.

Table 20 schematically shows an example of an offset parameter as asyntax structure when independent partitions are used for the lumapixels and the chroma pixels.

TABLE 20 sao_offset_param ( x, y, Depth, component ) { C Descriptor  if(split_flag[ component ][ Depth ][ y ][ x ] ) { sao_offset_param ( x + 0,y + 0, Depth + 1, component ) sao_offset_param ( x + 1, y + 0, Depth +1, component ) sao_offset_param ( x + 0, y + 1, Depth + 1, component )sao_offset_param ( x + 1, y + 1, Depth + 1, component )  } else {type_idx[ component ] [ Depth ][ y ][ x ] = 2 ue(v)|ae(v) sao_type_idxif( pqao_type_idx != 0 ) {  for( i = 0; i < SaoOffsetNum[  sao_type_idx]; i++ ) offset[ component ] [ Depth ][ y ][ x ][ i ] = 2 se(v)|ae(v)sao_offset }  } }

In the example shown in Table 20, sao_type_idx indicates an offset typeto be applied to the current region. The offset type indicated bysao_type_idx may be indicated as the corresponding offset type in theSAO type tables shown in Tables 8 to 11 or Table s16 and 17.

Here, sao_offset may indicate an offset to be applied to each pixelgroup, that is, each group when the total pixel values are classifiedinto band groups as described above.

FIG. 14 is a diagram schematically illustrating the operation of theencoder in the system according to the invention.

Referring to FIG. 14, the encoder reconstructs a block (S1410). Theencoder transforms and quantizes a residual block constructed on thebasis of a prediction block and a current block and generates areconstructed residual block through dequantization and inversetransform.

Subsequently, the encoder applies a loop filter to the reconstructedblock (S1420). The loop filtering may be performed by the filter moduleillustrated in FIG. 1 and the deblocking filter, the SAO, the ALF, andthe like may be applied. Here, the SAO may be applied to a picturehaving the deblocking filter applied thereto in the unit of pixels andthe ALF may be applied to the picture having the SAO applied thereto.The ALF may be applied only when HE (High Efficiency) is necessary.

When the SAO is applied, the filter module may apply an offset in theunit of pixel. Here, the filter module may adaptively determine thenumber of offsets (the number of bands), the band groups, and the likefor application of a band offset, or may transmit only the offsets foreffective bands to the decoder. The filter module may apply plural edgeoffsets to the SAO application region. Specific details thereof are thesame as described above.

The filter module may apply the SAO to chroma pixels. The SAOapplication region may be independently determined depending on luma andchroma. In addition, in case of the band offset for chroma, the numberof bands and the band groups may be determined to apply the offset tothe chroma pixels. In the edge offset for chroma, the number ofcategories in the direction of each edge may be adjusted. Specificdetails thereof are the same as described above.

The encoder may transmit a bitstream including picture information onapplication of the SAO and picture information on the SAO to the decoder(S1430).

FIG. 15 is a diagram schematically illustrating the operation of thedecoder in the system according to the invention.

Referring to FIG. 15, the decoder first receives a bitstream from theencoder (S1510). The received bitstream includes video information andinformation necessary for reconstructing the video information.

The decoder may reconstruct a block on the basis of the receivedinformation (S1520). The decoder may derive a reconstructed block on thebasis of the prediction block generated by prediction and the residualblock generated by dequantization and inverse transform.

The decoder may apply a loop filter to the reconstructed block (S1530).The loop filtering may be performed by the filter module illustrated inFIG. 2. The filter module may apply the deblocking filter, the SAO, andthe ALF, and the like. Here, the SAO may be applied to a picture havingthe deblocking filter applied thereto in the unit of pixel, and the ALFmay be applied to the picture having the SAO applied thereto. The ALFmay be applied only when HE (High Efficiency) is necessary.

When the SAO is applied, the filter module may apply an offset in theunit of pixel. Here, the filter module may derive an SAO parameter onthe basis of syntax elements transmitted from the encoder. The filtermodule may apply a band offset to a current pixel on the basis of thenumber of offsets (the number of bands), the band groups, and the likeindicated by SAO application information such as the SAO parameter.Here, only an offset for an effective band may be transmitted to thedecoder. The filter module may apply plural edge offsets to the SAOapplication region in accordance with indication of the SAO parameter orthe like. Specific details thereof are the same as described above.

The filter module may apply the SAO to chroma pixel. The SAO applicationregion may be independently determined depending on luma and chroma andrelevant information may be transmitted from the encoder. In addition,information on the number of bands and the band groups for applying theband offset to the chroma pixels and information on the number ofcategories for applying the edge offset to the chroma pixels may betransmitted from the encoder. The decoder may apply the SAO to thechroma pixels on the basis of the transmitted information. Specificdetails thereof are the same as described above.

While the methods in the above-mentioned exemplary system have beendescribed on the basis of flowcharts as a series of steps or blocks, theinvention is not limited to the order of the steps and a certain stepmay be performed in an order other than described above or at the sametime as described above. The above-mentioned embodiments include variousexamples. Therefore, the invention includes all substitutions,corrections, and modifications belonging to the appended claims.

When it is mentioned above that an element is “connected to” or “coupledto” another element, it should be understood that still another elementmay be interposed therebetween, as well as that the element may beconnected or coupled directly to another element. On the contrary, whenit is mentioned that an element is “connected directly to” or “coupleddirectly to” another element, it should be understood that still anotherelement is not interposed therebetween.

1. A video information encoding method comprising the steps of:generating a reconstructed block; applying a deblocking filter to thereconstructed block; applying a sample adaptive offset (SAO) to thereconstructed block to which the deblocking filter has been applied; andtransmitting information on the application of the SAO, wherein the stepof applying the SAO includes adaptively applying the SAO depending on anSAO application region to which the SAO may be applied.
 2. The method ofclaim 1, wherein the step of applying the SAO includes dividing anintensity section having a high occurrence frequency into bands of afiner intensity unit and applying a band offset.
 3. The method of claim1, wherein the step of applying the SAO includes applying a band offsetto an intensity section having a high occurrence frequency, and whereinthe step of transmitting information includes transmitting informationon a section to which the band offset is applied.
 4. The method of claim1, wherein the step of applying the SAO includes applying an offset toonly a band having a high occurrence frequency, and wherein the step oftransmitting information includes transmitting information on theapplied offset.
 5. The method of claim 1, wherein the step of applyingthe SAO includes selectively applying a plurality of different edgeoffsets to pixels of one SAO application region.
 6. A video informationencoding method comprising the steps of: generating a reconstructedblock; applying a deblocking filter to the reconstructed block; applyinga sample adaptive offset (SAO) to the reconstructed block to which thedeblocking filter has been applied; and transmitting information on theapplication of the SAO, wherein the step of applying the SAO includesapplying the SAO to chroma pixels, and wherein the step of transmittinginformation includes transmitting at least one of region information,division information of an SAO application region, SAO type information,and SAO offset information along with information on whether to applythe SAO to the chroma pixels.
 7. The method of claim 6, wherein the stepof applying the SAO includes setting an SAO application region forchroma independently of an SAO application region for luma.
 8. Themethod of claim 6, wherein the step of applying the SAO includesclassifying intensities of chroma pixels and applying a band offset to aband located in a section of a high occurrence frequency in the entireintensity range.
 9. The method of claim 6, wherein the step of applyingthe SAO includes determining to which of a case where the intensity ofat least one of neighboring chroma pixels is greater than the intensityof a current pixel and a case where the intensity of at least one ofneighboring chroma pixels is less than the intensity of the currentchroma pixel a relationship between the current chroma pixel and theneighboring chroma pixels belongs and applying an edge offset to thecurrent chroma pixel depending on the determination result.
 10. Themethod of claim 6, wherein the step of transmitting information includesseparately transmitting the SAO information for luma and chroma.
 11. Avideo information decoding method comprising the steps of: receivinginformation; deriving a reconstructed block on the basis of the receivedinformation; applying a deblocking filter to the reconstructed block;and applying a sample adaptive offset (SAO) to the reconstructed blockto which the deblocking filter has been applied, wherein the step ofapplying the SAO includes adaptively applying the SAO depending on anSAO application region to which the SAO will be applied.
 12. The methodof claim 11, wherein the step of applying the SAO includes dividing anintensity section having a high occurrence frequency into bands of afiner intensity unit and applying a band offset.
 13. The method of claim11, wherein the step of applying the SAO includes applying a band offsetto an intensity section having a high occurrence frequency, and whereinthe intensity section having a high occurrence frequency is determinedon the basis of the received information.
 14. The method of claim 11,wherein the step of applying the SAO includes applying an offset to onlya band corresponding to the offset included in the received informationout of the total bands.
 15. The method of claim 11, wherein the step ofapplying the SAO includes selectively applying a plurality of differentedge offsets to pixels of one SAO application region, and wherein theselectively-applied edge offsets are determined on the basis of thereceived information.
 16. A video information decoding method comprisingthe steps of: receiving information; deriving a reconstructed block;applying a deblocking filter to the reconstructed block; and applying asample adaptive offset (SAO) to the reconstructed block to which thedeblocking filter has been applied, wherein the step of applying the SAOincludes applying the SAO to chroma pixels, and wherein the informationreceived in the step of receiving information includes at least one ofregion information, division information of an SAO application region,SAO type information, and SAO offset information along with informationon whether to apply the SAO to the chroma pixels.
 17. The method ofclaim 16, wherein an SAO application region for chroma in the step ofapplying the SAO is set independently of an SAO application region forluma.
 18. The method of claim 16, wherein the step of applying the SAOincludes classifying intensities of chroma pixels and applying a bandoffset to a band located in a section of a high occurrence frequency inthe entire intensity range.
 19. The method of claim 16, wherein the stepof applying the SAO includes determining to which of a case where theintensity of at least one of neighboring chroma pixels is greater thanthe intensity of a current pixel and a case where the intensity of atleast one of neighboring chroma pixels is less than the intensity of thecurrent chroma pixel a relationship between the current chroma pixel andthe neighboring chroma pixels belongs and applying an edge offset to thecurrent chroma pixel depending on the determination result, and whereinthe value of the edge offset is determined on the basis of theinformation received in the step of receiving information.
 20. Themethod of claim 16, wherein the information received in the step ofreceiving information indicates which of information on luma,information on chroma, and information on both luma and chroma theinformation is.